<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   Python爬虫实战之：模拟登录淘宝并获取所有订单  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://dataunion.org/22388.html",
                  host: "http://dataunion.org",
                  prePath: "http://dataunion.org",
                  scheme: "http",
                  pathBase: "http://dataunion.org/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466459539: Accept with keywords: (title(0.333333333333):社区,Python,数盟,爬虫,订单,淘宝, topn(0.233333333333):浏览器,编程语言,手动,数盟,信息,利用,淘宝,界面,状态,用户名,加密,结果,Python,订单号,文章,数据,图片,编码,记录,正则表达式,博主,用户,密码,链接,鼠标,错误,代码,验证码,内容,页面).-->
 </head>
 <body onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    Python爬虫实战之：模拟登录淘宝并获取所有订单
   </h1>
  </div>
  <div class="container" id="xmain">
   ﻿﻿
   <title>
    Python爬虫实战之：模拟登录淘宝并获取所有订单 | 数盟社区
   </title>
   <!-- All in One SEO Pack 2.2.7.6.2 by Michael Torbert of Semper Fi Web Design[32,72] -->
   <!-- /all in one seo pack -->
   <!--
<div align="center">
<a href="http://strata.oreilly.com.cn/hadoop-big-data-cn?cmp=mp-data-confreg-home-stcn16_dataunion_pc" target="_blank"><img src="http://dataunion.org/wp-content/uploads/2016/05/stratabj.jpg"/ ></a>
</div>
-->
   <header id="header-web">
    <div class="header-main">
     <hgroup class="logo">
      <h1>
       <a href="http://dataunion.org/" rel="home" title="数盟社区">
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/logo.png"/>
       </a>
      </h1>
     </hgroup>
     <!--logo-->
     <nav class="header-nav">
      <ul class="menu" id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-71" id="menu-item-71">
        <a href="http://dataunion.org/category/events" title="events">
         活动
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22457" id="menu-item-22457">
          <a href="http://dataunion.org/2016timeline">
           2016档期
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22459" id="menu-item-22459">
          <a href="http://dataunion.org/category/parterc">
           合作会议
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor menu-item-has-children menu-item-20869" id="menu-item-20869">
        <a href="http://dataunion.org/category/tech" title="articles">
         文章
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20867" id="menu-item-20867">
          <a href="http://dataunion.org/category/tech/base" title="base">
           基础架构
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3302" id="menu-item-3302">
          <a href="http://dataunion.org/category/tech/ai" title="ai">
           人工智能
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3303" id="menu-item-3303">
          <a href="http://dataunion.org/category/tech/analysis" title="analysis">
           数据分析
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21920" id="menu-item-21920">
          <a href="http://dataunion.org/category/tech/dm">
           数据挖掘
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3314" id="menu-item-3314">
          <a href="http://dataunion.org/category/tech/viz" title="viz">
           可视化
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-3305" id="menu-item-3305">
          <a href="http://dataunion.org/category/tech/devl" title="devl">
           编程语言
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-20876" id="menu-item-20876">
        <a href="http://dataunion.org/category/industry">
         行业
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16328" id="menu-item-16328">
          <a href="http://dataunion.org/category/industry/case" title="case">
           行业应用
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-2112" id="menu-item-2112">
          <a href="http://dataunion.org/category/industry/demo" title="demo">
           Demo展示
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21562" id="menu-item-21562">
          <a href="http://dataunion.org/category/industry/news">
           行业资讯
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-311" id="menu-item-311">
        <a href="http://dataunion.org/category/sources" title="sources">
         资源
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20870" id="menu-item-20870">
        <a href="http://dataunion.org/category/books" title="book">
         图书
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21363" id="menu-item-21363">
        <a href="http://dataunion.org/category/training">
         课程
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-21853" id="menu-item-21853">
        <a href="http://dataunion.org/category/jobs">
         职位
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22050" id="menu-item-22050">
          <a href="http://dataunion.org/category/career">
           职业规划
          </a>
         </li>
        </ul>
       </li>
      </ul>
     </nav>
     <!--header-nav-->
    </div>
   </header>
   <!--header-web-->
   <div id="main">
    <div id="soutab">
     <form action="http://dataunion.org/" class="search" method="get">
     </form>
    </div>
    <div id="container">
     <nav id="mbx">
      当前位置：
      <a href="http://dataunion.org">
       首页
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech">
       文章
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech/devl">
       编程语言
      </a>
      &gt;  正文
     </nav>
     <!--mbx-->
     <article class="content">
      <header align="centre" class="contenttitle">
       <div class="mscc">
        <h1 class="mscctitle">
         <a href="http://dataunion.org/22388.html">
          Python爬虫实战之：模拟登录淘宝并获取所有订单
         </a>
        </h1>
        <address class="msccaddress ">
         <em>
          1,121 次阅读 -
         </em>
         <a href="http://dataunion.org/category/tech/devl" rel="category tag">
          编程语言
         </a>
        </address>
       </div>
      </header>
      <div class="content-text">
       <p>
        原文出处：
        <a href="http://cuiqingcai.com/1076.html" target="_blank">
         崔庆才的博客（@崔庆才丨静觅）
        </a>
       </p>
       <p>
        经过多次尝试，模拟登录淘宝终于成功了，实在是不容易，淘宝的登录加密和验证太复杂了，煞费苦心，在此写出来和大家一起分享，希望大家支持。
       </p>
       <h2>
        本篇内容
       </h2>
       <p>
        1. python模拟登录淘宝网页
       </p>
       <p>
        2. 获取登录用户的所有订单详情
       </p>
       <p>
        3. 学会应对出现验证码的情况
       </p>
       <p>
        4. 体会一下复杂的模拟登录机制
       </p>
       <h2>
        探索部分成果
       </h2>
       <p>
        1. 淘宝的密码用了AES加密算法，最终将密码转化为256位，在POST时，传输的是256位长度的密码。
       </p>
       <p>
        2. 淘宝在登录时必须要输入验证码，在经过几次尝试失败后最终获取了验证码图片让用户手动输入来验证。
       </p>
       <p>
        3. 淘宝另外有复杂且每天在变的 ua 加密算法，在程序中我们需要提前获取某一 ua 码才可进行模拟登录。
       </p>
       <p>
        4. 在获取最后的登录 st 码时，历经了多次请求和正则表达式提取，且 st 码只可使用一次。
       </p>
       <h2>
        整体思路梳理
       </h2>
       <p>
        1. 手动到浏览器获取 ua 码以及 加密后的密码，只获取一次即可，一劳永逸。
       </p>
       <p>
        2. 向登录界面发送登录请求，POST 一系列参数，包括 ua 码以及密码等等，获得响应，提取验证码图像。
       </p>
       <p>
        3. 用户输入手动验证码，重新加入验证码数据再次用 POST 方式发出请求，获得响应，提取 J_Htoken。
       </p>
       <p>
        4. 利用 J_Htoken 向 alipay 发出请求，获得响应，提取 st 码。
       </p>
       <p>
        5. 利用 st 码和用户名，重新发出登录请求，获得响应，提取重定向网址，存储 cookie。
       </p>
       <p>
        6. 利用 cookie 向其他个人页面如订单页面发出请求，获得响应，提取订单详情。
       </p>
       <p>
        是不是没看懂？没事，下面我将一点点说明自己模拟登录的过程，希望大家可以理解。
       </p>
       <h2>
        前期准备
       </h2>
       <p>
        由于淘宝的 ua 算法和 aes 密码加密算法太复杂了，ua 算法在淘宝每天都是在变化的，不过，这个内容你获取之后一直用即可，经过测试之后没有问题，一劳永逸。
       </p>
       <p>
        那么 ua 和 aes 密码怎样获取呢？
       </p>
       <p>
        我们就从浏览器里面直接获取吧，打开浏览器，找到淘宝的登录界面，按 F12 或者浏览器右键审查元素。
       </p>
       <p>
        在这里我用的是火狐浏览器，首先记得在浏览器中设置一下显示持续日志，要不然页面跳转了你就看不到之前抓取的信息了。在这里截图如下：
       </p>
       <p>
        <a href="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/20150225013600.jpg" title="">
         <img src="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/20150225013600.jpg"/>
        </a>
       </p>
       <p>
       </p>
       <p>
        好，那么接下来我们就从浏览器中获取 ua 和 aes 密码
       </p>
       <p>
        点击网络选项卡，这时都是空的，什么数据也没有截取。这时你就在网页上登录一下试试吧，输入用户名啊，密码啊，有必要时需要输入验证码，点击登录。
       </p>
       <p>
        <a href="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225014124.jpg" title="">
         <img src="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225014124.jpg"/>
        </a>
       </p>
       <p>
        等跳转成功后，你就可以看到好多日志记录了，点击图中的那一行 login.taobo.com，然后查看参数，你就会发现表单数据了，其中就包括 ua 还有下面的 password2，把这俩复制下来，我们之后要用到的。这就是我们需要的 ua 还有 aes 加密后的密码。
       </p>
       <p>
        <a href="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225014019.jpg" title="">
         <img src="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225014019.jpg"/>
        </a>
       </p>
       <p>
        恩，读到这里，你应该获取到了属于自己的 ua 和 password2 两个内容。
       </p>
       <h2>
        输入验证码并获取J_HToken
       </h2>
       <p>
        经过博主本人亲自验证，有时候，在模拟登录时你并不需要输入验证码，它直接返回的结果就是前面所说的下一步用到的 J_Token，而有时候你则会需要输入验证码，等你手动输入验证码之后，重新请求登录一次。
       </p>
       <p>
        博主是边写程序边更新文章的，现在写完了是否有必要输入验证码的检验以及在浏览器中呈现验证码。
       </p>
       <p>
        代码如下
       </p>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdea88856916660">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-22">
               22
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-23">
               23
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-24">
               24
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-25">
               25
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-26">
               26
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-27">
               27
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-28">
               28
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-29">
               29
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-30">
               30
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-31">
               31
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-32">
               32
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-33">
               33
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-34">
               34
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-35">
               35
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-36">
               36
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-37">
               37
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-38">
               38
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-39">
               39
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-40">
               40
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-41">
               41
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-42">
               42
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-43">
               43
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-44">
               44
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-45">
               45
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-46">
               46
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-47">
               47
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-48">
               48
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-49">
               49
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-50">
               50
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-51">
               51
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-52">
               52
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-53">
               53
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-54">
               54
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-55">
               55
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-56">
               56
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-57">
               57
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-58">
               58
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-59">
               59
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-60">
               60
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-61">
               61
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-62">
               62
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-63">
               63
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-64">
               64
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-65">
               65
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-66">
               66
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-67">
               67
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-68">
               68
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-69">
               69
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-70">
               70
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-71">
               71
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-72">
               72
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-73">
               73
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-74">
               74
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-75">
               75
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-76">
               76
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-77">
               77
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-78">
               78
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-79">
               79
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-80">
               80
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-81">
               81
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-82">
               82
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-83">
               83
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-84">
               84
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-85">
               85
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-86">
               86
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-87">
               87
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-88">
               88
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-89">
               89
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-90">
               90
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-91">
               91
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-92">
               92
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-93">
               93
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-94">
               94
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-95">
               95
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-96">
               96
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-97">
               97
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-98">
               98
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-99">
               99
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-100">
               100
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-101">
               101
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-102">
               102
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-103">
               103
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-104">
               104
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-105">
               105
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-106">
               106
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-107">
               107
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-108">
               108
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-109">
               109
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-110">
               110
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-111">
               111
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-112">
               112
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-113">
               113
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-114">
               114
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-115">
               115
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-116">
               116
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-117">
               117
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-118">
               118
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-119">
               119
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-120">
               120
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-121">
               121
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-122">
               122
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-123">
               123
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-124">
               124
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-125">
               125
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-126">
               126
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-127">
               127
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-128">
               128
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-129">
               129
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-130">
               130
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-131">
               131
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-132">
               132
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-133">
               133
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-134">
               134
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-135">
               135
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-136">
               136
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-137">
               137
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-138">
               138
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-139">
               139
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-140">
               140
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-141">
               141
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-142">
               142
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-143">
               143
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-144">
               144
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-145">
               145
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-146">
               146
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea88856916660-147">
               147
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea88856916660-148">
               148
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-1">
               <span class="crayon-v">
                __author__
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘CQC’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-2">
               <span class="crayon-c">
                # -*- coding:utf-8 -*-
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-4">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                urllib
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-5">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-6">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                cookielib
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-7">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                re
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-8">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                webbrowser
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-9">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-10">
               <span class="crayon-c">
                #模拟登录淘宝类
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-11">
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-v">
                Taobao
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-12">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #初始化方法
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                __init__
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #登录的URL
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                “https://login.taobao.com/member/login.jhtml”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #代理IP地址，防止自己的IP被封禁
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxyURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘http://120.193.146.97:843’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #登录POST数据时发送的头部信息
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-20">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginHeaders
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-21">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Host’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘login.taobao.com’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-22">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘User-Agent’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-23">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Referer’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘https://login.taobao.com/member/login.jhtml’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-24">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Content-Type’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘application/x-www-form-urlencoded’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-25">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Connection’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘Keep-Alive’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-26">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-27">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #用户名
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-28">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                username
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘cqcre’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-29">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #ua字符串，经过淘宝ua算法计算得出，包含了时间戳,浏览器,屏幕分辨率,随机数,鼠标移动,鼠标点击,其实还有键盘输入记录,鼠标移动的记录、点击的记录等等的信息
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-30">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                ua
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘191UW5TcyMNYQwiAiwTR3tCf0J/QnhEcUpkMmQ=|Um5Ockt0TXdPc011TXVKdyE=|U2xMHDJ+H2QJZwBxX39Rb1d5WXcrSixAJ1kjDVsN|VGhXd1llXGNaYFhkWmJaYl1gV2pIdUtyTXRKfkN4Qn1FeEF6R31TBQ==|VWldfS0TMw8xDjYWKhAwHiUdOA9wCDEVaxgkATdcNU8iDFoM|VmNDbUMV|V2NDbUMV|WGRYeCgGZhtmH2VScVI2UT5fORtmD2gCawwuRSJHZAFsCWMOdVYyVTpbPR99HWAFYVMpUDUFORshHiQdJR0jAT0JPQc/BDoFPgooFDZtVBR5Fn9VOwt2EWhCOVQ4WSJPJFkHXhgoSDVIMRgnHyFqQ3xEezceIRkmahRqFDZLIkUvRiEDaA9qQ3xEezcZORc5bzk=|WWdHFy0TMw8vEy0UIQE0ADgYJBohGjoAOw4uEiwXLAw2DThu9a==|WmBAED5+KnIbdRh1GXgFQSZbGFdrUm1UblZqVGxQa1ZiTGxQcEp1I3U=|W2NDEz19KXENZwJjHkY7Ui9OJQsre09zSWlXY1oMLBExHzERLxsuE0UT|XGZGFjh4LHQdcx5zH34DRyBdHlFtVGtSaFBsUmpWbVBkSmpXd05zTnMlcw==|XWdHFzl5LXUJYwZnGkI/VitKIQ8vEzMKNws3YTc=|XmdaZ0d6WmVFeUB8XGJaYEB4TGxWbk5yTndXa0tyT29Ta0t1QGBeZDI=’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-31">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #密码，在这里不能输入真实密码，淘宝对此密码进行了加密处理，256位，此处为加密后的密码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-32">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                password2
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘7511aa68sx629e45de220d29174f1066537a73420ef6dbb5b46f202396703a2d56b0312df8769d886e6ca63d587fdbb99ee73927e8c07d9c88cd02182e1a21edc13fb8e140a4a2a4b5c253bf38484bd0e08199e03eb9bf7b365a5c673c03407d812b91394f0d3c7564042e3f2b11d156aeea37ad6460118914125ab8f8ac466f’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-33">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-34">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘ua’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                ua
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-35">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_checkcode’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-36">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘CtrlVersion’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1,0,0,7’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-37">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_password’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-38">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_redirect_url’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘http://i.taobao.com/my_taobao.htm?nekot=udm8087E1424147022443’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-39">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_username’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                username
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-40">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginsite’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘0’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-41">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘newlogin’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘0’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-42">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘from’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘tb’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-43">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘fc’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘default’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-44">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘style’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘default’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-45">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘css_style’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-46">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘tid’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘XOR_1_000000000000000000000000000000_625C4720470A0A050976770A’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-47">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘support’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘000001’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-48">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginType’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘4’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-49">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘minititle’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-50">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘minipara’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-51">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘umto’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘NaN’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-52">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘pstrong’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘3’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-53">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘llnick’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-54">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘sign’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-55">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘need_sign’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-56">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘isIgnore’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-57">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘full_redirect’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-58">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘popid’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-59">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘callback’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-60">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘guf’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-61">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘not_duplite_str’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-62">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘need_user_id’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-63">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘poy’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-64">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘gvfdcname’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ’10’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-65">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘gvfdcre’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-66">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘from_encoding ‘
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-67">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘sub’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-68">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_password_2’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                password2
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-69">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginASR’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-70">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginASRSuc’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-71">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘allp’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-72">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘oslanguage’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘zh-CN’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-73">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘sr’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1366*768’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-74">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘osVer’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘windows|6.1’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-75">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘naviVer’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘firefox|35’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-76">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-77">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #将POST的数据进行编码转换
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-78">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                postData
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                urlencode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-79">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置代理
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-80">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxy
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                ProxyHandler
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-s">
                ‘http’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxyURL
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-81">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置cookie
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-82">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                cookie
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                cookielib
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                LWPCookieJar
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-83">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置cookie处理器
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-84">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cookieHandler
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                HTTPCookieProcessor
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                cookie
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-85">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置登录时用到的opener，它的open方法相当于urllib2.urlopen
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-86">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                opener
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                build_opener
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cookieHandler
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxy
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                HTTPHandler
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-87">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-88">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到是否需要输入验证码，这次请求的相应有时会不同，有时需要验证有时不需要
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-89">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                needIdenCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-90">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #第一次登录获取验证码尝试，构建request
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-91">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Request
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginURL
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                postData
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginHeaders
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-92">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到第一次登录尝试的相应
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-93">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                opener
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                open
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-94">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取其中的内容
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-95">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                read
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                decode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘gbk’
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-96">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取状态吗
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-97">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getcode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-98">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #状态码为200，获取成功
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-99">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-cn">
                200
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-100">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “获取请求成功”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-101">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801这六个字是请输入验证码的utf-8编码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-102">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                ‘\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-103">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-104">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #如果找到该字符，代表需要输入验证码
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-105">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-106">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “此次安全验证异常，您需要输入验证码”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-107">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-v">
                content
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-108">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #否则不需要
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-109">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-110">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “此次安全验证通过，您这次不需要输入验证码”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-111">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-112">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-113">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “获取请求失败”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-114">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-115">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到验证码图片
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-116">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                getIdenCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-117">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到验证码的图片
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-118">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘&lt;img id=”J_StandardCode_m.*?data-src=”(.*?)”‘
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-119">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #匹配的结果
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-120">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                matchResult
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-121">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #已经匹配得到内容，并且验证码图片链接不为空
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-122">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-e">
                matchResult
               </span>
               <span class="crayon-st">
                and
               </span>
               <span class="crayon-v">
                matchResult
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-123">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-v">
                matchResult
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-124">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-v">
                matchResult
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-125">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-126">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “没有找到验证码内容”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-127">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-128">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-129">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #程序运行主干
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-130">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-131">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #是否需要验证码，是则得到页面内容，不是则返回False
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-132">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                needResult
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                needIdenCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-133">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-st">
                not
               </span>
               <span class="crayon-v">
                needResult
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-t">
                False
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-134">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “您需要手动输入验证码”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-135">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                idenCode
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getIdenCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                needResult
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-136">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到了验证码的链接
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-137">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-st">
                not
               </span>
               <span class="crayon-v">
                idenCode
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-t">
                False
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-138">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “验证码获取成功”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-139">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “请在浏览器中输入您看到的验证码”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-140">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                webbrowser
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                open_new_tab
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                idenCode
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-141">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #验证码链接为空，无效验证码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-142">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-143">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “验证码获取失败，请重试”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-144">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-145">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “不需要输入验证码”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-146">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea88856916660-147">
               <span class="crayon-v">
                taobao
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-e">
                Taobao
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea88856916660-148">
               <span class="crayon-v">
                taobao
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <p>
        恩，请把里面的 ua 和 password2 还有用户名换成自己的进行尝试，用我的可能会产生错误的。
       </p>
       <p>
        运行结果
       </p>
       <p>
        <a href="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225015508.jpg" title="">
         <img src="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225015508.jpg"/>
        </a>
       </p>
       <p>
        然后会蹦出浏览器，显示了验证码的内容，这个需要你来手动输入。
       </p>
       <p>
        在这里有小伙伴向我反映有这么个错误
       </p>
       <p>
        <a href="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E5%9B%BE%E7%89%8720150227181617.png" title="">
         <img src="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E5%9B%BE%E7%89%8720150227181617.png"/>
        </a>
       </p>
       <p>
        经过查证，竟然是版本问题，博主本人用的是 2.7.7，而小伙伴用的是 2.7.9。后来换成 2.7.7 就好了…，我也是醉了，希望有相同错误的小伙伴，可以尝试换一下版本…
       </p>
       <p>
        好啦，运行时会弹出浏览器，如图
       </p>
       <p>
        <a href="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225015717.jpg" title="">
         <img src="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225015717.jpg"/>
        </a>
       </p>
       <p>
        那么，我们现在需要手动输入验证码，重新向登录界面发出登录请求，之前的post数据内容加入验证码这一项，重新请求一次，如果请求成功，则会返回 下一步我们需要的 J_HToken，如果验证码输入错误，则会返回验证码输入错误的选项。好，下面，我已经写到了获取J_HToken的进度，代码如下，现在运行程序，会 蹦出浏览器，然后提示你输入验证码，用户手动输入之后，则会返回一个页面，我们提取出 J_Htoken即可。
       </p>
       <p>
        注意，到现在为止，你还没有登录成功，只是获取到了J_HToken的值。
       </p>
       <p>
        目前写到的代码如下
       </p>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdea9c041268264">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-22">
               22
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-23">
               23
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-24">
               24
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-25">
               25
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-26">
               26
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-27">
               27
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-28">
               28
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-29">
               29
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-30">
               30
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-31">
               31
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-32">
               32
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-33">
               33
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-34">
               34
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-35">
               35
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-36">
               36
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-37">
               37
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-38">
               38
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-39">
               39
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-40">
               40
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-41">
               41
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-42">
               42
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-43">
               43
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-44">
               44
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-45">
               45
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-46">
               46
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-47">
               47
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-48">
               48
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-49">
               49
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-50">
               50
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-51">
               51
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-52">
               52
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-53">
               53
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-54">
               54
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-55">
               55
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-56">
               56
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-57">
               57
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-58">
               58
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-59">
               59
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-60">
               60
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-61">
               61
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-62">
               62
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-63">
               63
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-64">
               64
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-65">
               65
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-66">
               66
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-67">
               67
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-68">
               68
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-69">
               69
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-70">
               70
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-71">
               71
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-72">
               72
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-73">
               73
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-74">
               74
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-75">
               75
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-76">
               76
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-77">
               77
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-78">
               78
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-79">
               79
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-80">
               80
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-81">
               81
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-82">
               82
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-83">
               83
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-84">
               84
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-85">
               85
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-86">
               86
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-87">
               87
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-88">
               88
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-89">
               89
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-90">
               90
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-91">
               91
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-92">
               92
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-93">
               93
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-94">
               94
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-95">
               95
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-96">
               96
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-97">
               97
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-98">
               98
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-99">
               99
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-100">
               100
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-101">
               101
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-102">
               102
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-103">
               103
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-104">
               104
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-105">
               105
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-106">
               106
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-107">
               107
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-108">
               108
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-109">
               109
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-110">
               110
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-111">
               111
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-112">
               112
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-113">
               113
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-114">
               114
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-115">
               115
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-116">
               116
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-117">
               117
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-118">
               118
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-119">
               119
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-120">
               120
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-121">
               121
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-122">
               122
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-123">
               123
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-124">
               124
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-125">
               125
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-126">
               126
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-127">
               127
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-128">
               128
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-129">
               129
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-130">
               130
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-131">
               131
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-132">
               132
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-133">
               133
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-134">
               134
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-135">
               135
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-136">
               136
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-137">
               137
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-138">
               138
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-139">
               139
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-140">
               140
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-141">
               141
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-142">
               142
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-143">
               143
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-144">
               144
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-145">
               145
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-146">
               146
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-147">
               147
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-148">
               148
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-149">
               149
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-150">
               150
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-151">
               151
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-152">
               152
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-153">
               153
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-154">
               154
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-155">
               155
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-156">
               156
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-157">
               157
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-158">
               158
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-159">
               159
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-160">
               160
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-161">
               161
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-162">
               162
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-163">
               163
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-164">
               164
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-165">
               165
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-166">
               166
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-167">
               167
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-168">
               168
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-169">
               169
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-170">
               170
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-171">
               171
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-172">
               172
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-173">
               173
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-174">
               174
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-175">
               175
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-176">
               176
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-177">
               177
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-178">
               178
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-179">
               179
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-180">
               180
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-181">
               181
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-182">
               182
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-183">
               183
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-184">
               184
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-185">
               185
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-186">
               186
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-187">
               187
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-188">
               188
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-189">
               189
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-190">
               190
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-191">
               191
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-192">
               192
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-193">
               193
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-194">
               194
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-195">
               195
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-196">
               196
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-197">
               197
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdea9c041268264-198">
               198
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdea9c041268264-199">
               199
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-1">
               <span class="crayon-v">
                __author__
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘CQC’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-2">
               <span class="crayon-c">
                # -*- coding:utf-8 -*-
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-4">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                urllib
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-5">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-6">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                cookielib
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-7">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                re
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-8">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                webbrowser
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-9">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-10">
               <span class="crayon-c">
                #模拟登录淘宝类
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-11">
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-v">
                Taobao
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-12">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #初始化方法
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                __init__
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #登录的URL
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                “https://login.taobao.com/member/login.jhtml”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #代理IP地址，防止自己的IP被封禁
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxyURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘http://120.193.146.97:843’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #登录POST数据时发送的头部信息
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-20">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginHeaders
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-21">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Host’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘login.taobao.com’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-22">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘User-Agent’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-23">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Referer’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘https://login.taobao.com/member/login.jhtml’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-24">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Content-Type’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘application/x-www-form-urlencoded’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-25">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Connection’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘Keep-Alive’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-26">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-27">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #用户名
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-28">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                username
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘cqcre’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-29">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #ua字符串，经过淘宝ua算法计算得出，包含了时间戳,浏览器,屏幕分辨率,随机数,鼠标移动,鼠标点击,其实还有键盘输入记录,鼠标移动的记录、点击的记录等等的信息
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-30">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                ua
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘191UW5TcyMNYQwiAiwTR3tCf0J/QnhEcUpkMmQ=|Um5Ockt0TXdPc011TXVKdyE=|U2xMHDJ+H2QJZwBxX39Rb1d5WXcrSixAJ1kjDVsN|VGhXd1llXGNaYFhkWmJaYl1gV2pIdUtyTXRKfkN4Qn1FeEF6R31TBQ==|VWldfS0TMw8xDjYWKhAwHiUdOA9wCDEVaxgkATdcNU8iDFoM|VmNDbUMV|V2NDbUMV|WGRYeCgGZhtmH2VScVI2UT5fORtmD2gCawwuRSJHZAFsCWMOdVYyVTpbPR99HWAFYVMpUDUFORshHiQdJR0jAT0JPQc/BDoFPgooFDZtVBR5Fn9VOwt2EWhCOVQ4WSJPJFkHXhgoSDVIMRgnHyFqQ3xEezceIRkmahRqFDZLIkUvRiEDaA9qQ3xEezcZORc5bzk=|WWdHFy0TMw8vEy0UIQE0ADgYJBohGjoAOw4uEiwXLAw2DThuOA==|WmBAED5+KnIbdRh1GXgFQSZbGFdrUm1UblZqVGxQa1ZiTGxQcEp1I3U=|W2NDEz19KXENZwJjHkY7Ui9OJQsre09zSWlXY1oMLBExHzERLxsuE0UT|XGZGFjh4LHQdcx5zH34DRyBdHlFtVGtSaFBsUmpWbVBkSmpXd05zTnMlcw==|XWdHFzl5LXUJYwZnGkI/VitKIQ8vEzMKNws3YTc=|XmdaZ0d6WmVFeUB8XGJaYEB4TGxWbk5yTndXa0tyT29Ta0t1QGBeZDI=’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-31">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #密码，在这里不能输入真实密码，淘宝对此密码进行了加密处理，256位，此处为加密后的密码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-32">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                password2
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘7511aa6854629e45de220d29174f1066537a73420ef6dbb5b46f202396703a2d56b0312df8769d886e6ca63d587fdbb99ee73927e8c07d9c88cd02182e1a21edc13fb8e0a4a2a4b5c253bf38484bd0e08199e03eb9bf7b365a5c673c03407d812b91394f0d3c7564042e3f2b11d156aeea37ad6460118914125ab8f8ac466f’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-33">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-34">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘ua’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                ua
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-35">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_checkcode’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-36">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘CtrlVersion’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1,0,0,7’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-37">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_password’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-38">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_redirect_url’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘http://i.taobao.com/my_taobao.htm?nekot=udm8087E1424147022443’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-39">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_username’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                username
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-40">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginsite’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘0’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-41">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘newlogin’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘0’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-42">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘from’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘tb’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-43">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘fc’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘default’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-44">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘style’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘default’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-45">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘css_style’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-46">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘tid’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘XOR_1_000000000000000000000000000000_625C4720470A0A050976770A’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-47">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘support’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘000001’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-48">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginType’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘4’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-49">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘minititle’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-50">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘minipara’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-51">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘umto’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘NaN’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-52">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘pstrong’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘3’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-53">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘llnick’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-54">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘sign’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-55">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘need_sign’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-56">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘isIgnore’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-57">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘full_redirect’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-58">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘popid’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-59">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘callback’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-60">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘guf’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-61">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘not_duplite_str’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-62">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘need_user_id’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-63">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘poy’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-64">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘gvfdcname’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ’10’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-65">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘gvfdcre’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-66">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘from_encoding ‘
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-67">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘sub’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-68">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_password_2’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                password2
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-69">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginASR’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-70">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginASRSuc’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-71">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘allp’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-72">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘oslanguage’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘zh-CN’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-73">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘sr’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1366*768’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-74">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘osVer’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘windows|6.1’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-75">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘naviVer’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘firefox|35’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-76">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-77">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #将POST的数据进行编码转换
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-78">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                postData
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                urlencode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-79">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置代理
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-80">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxy
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                ProxyHandler
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-s">
                ‘http’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxyURL
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-81">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置cookie
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-82">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                cookie
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                cookielib
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                LWPCookieJar
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-83">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置cookie处理器
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-84">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cookieHandler
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                HTTPCookieProcessor
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                cookie
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-85">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置登录时用到的opener，它的open方法相当于urllib2.urlopen
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-86">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                opener
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                build_opener
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cookieHandler
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxy
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                HTTPHandler
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-87">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-88">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到是否需要输入验证码，这次请求的相应有时会不同，有时需要验证有时不需要
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-89">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                needCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-90">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #第一次登录获取验证码尝试，构建request
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-91">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Request
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginURL
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                postData
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginHeaders
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-92">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到第一次登录尝试的相应
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-93">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                opener
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                open
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-94">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取其中的内容
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-95">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                read
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                decode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘gbk’
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-96">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取状态吗
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-97">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getcode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-98">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #状态码为200，获取成功
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-99">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-cn">
                200
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-100">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “获取请求成功”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-101">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801这六个字是请输入验证码的utf-8编码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-102">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                ‘\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-103">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-104">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-v">
                content
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-105">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #如果找到该字符，代表需要输入验证码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-106">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-107">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “此次安全验证异常，您需要输入验证码”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-108">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-v">
                content
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-109">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #否则不需要
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-110">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-111">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #返回结果直接带有J_HToken字样，表明直接验证通过
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-112">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                tokenPattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘id=”J_HToken”‘
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-113">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                tokenPattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-114">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-115">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “此次安全验证通过，您这次不需要输入验证码”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-116">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-117">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-118">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “获取请求失败”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-119">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                None
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-120">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-121">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到验证码图片
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-122">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                getCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-123">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到验证码的图片
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-124">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘&lt;img id=”J_StandardCode_m.*?data-src=”(.*?)”‘
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-125">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #匹配的结果
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-126">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                matchResult
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-127">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #已经匹配得到内容，并且验证码图片链接不为空
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-128">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-e">
                matchResult
               </span>
               <span class="crayon-st">
                and
               </span>
               <span class="crayon-v">
                matchResult
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-129">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-v">
                matchResult
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-130">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-v">
                matchResult
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-131">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-132">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “没有找到验证码内容”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-133">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-134">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-135">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #输入验证码，重新请求，如果验证成功，则返回J_HToken
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-136">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                loginWithCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-137">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #提示用户输入验证码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-138">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                checkcode
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                raw_input
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘请输入验证码:’
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-139">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #将验证码重新添加到post的数据中
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-140">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-s">
                ‘TPL_checkcode’
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                checkcode
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-141">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #对post数据重新进行编码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-142">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                postData
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                urlencode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-143">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                try
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-144">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #再次构建请求，加入验证码之后的第二次登录尝试
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-145">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Request
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginURL
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                postData
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginHeaders
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-146">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到第一次登录尝试的相应
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-147">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                opener
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                open
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-148">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取其中的内容
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-149">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                read
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                decode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘gbk’
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-150">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #检测验证码错误的正则表达式，\u9a8c\u8bc1\u7801\u9519\u8bef 是验证码错误五个字的编码
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-151">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                ‘\u9a8c\u8bc1\u7801\u9519\u8bef’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-152">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-153">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #如果返回页面包括了，验证码错误五个字
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-154">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-155">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “验证码输入错误”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-156">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-157">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-158">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #返回结果直接带有J_HToken字样，说明验证码输入成功，成功跳转到了获取HToken的界面
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-159">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                tokenPattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘id=”J_HToken” value=”(.*?)”‘
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-160">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                tokenPattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-161">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #如果匹配成功，找到了J_HToken
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-162">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-163">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “验证码输入正确”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-164">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-165">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-166">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-167">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #匹配失败，J_Token获取失败
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-168">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “J_Token获取失败”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-169">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-170">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                except
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                HTTPError
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                e
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-171">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “连接服务器出错，错误原因”
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                e
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                reason
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-172">
               <span class="crayon-e">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-173">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-174">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #程序运行主干
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-175">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-176">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #是否需要验证码，是则得到页面内容，不是则返回False
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-177">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                needResult
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                needCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-178">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #请求获取失败，得到的结果是None
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-179">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-st">
                not
               </span>
               <span class="crayon-v">
                needResult
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-t">
                None
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-180">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-st">
                not
               </span>
               <span class="crayon-v">
                needResult
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-t">
                False
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-181">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “您需要手动输入验证码”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-182">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                idenCode
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                needResult
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-183">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到了验证码的链接
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-184">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-st">
                not
               </span>
               <span class="crayon-v">
                idenCode
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-t">
                False
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-185">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “验证码获取成功”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-186">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “请在浏览器中输入您看到的验证码”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-187">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                webbrowser
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                open_new_tab
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                idenCode
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-188">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                J_HToken
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                loginWithCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-189">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                “J_HToken”
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                J_HToken
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-190">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #验证码链接为空，无效验证码
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-191">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-192">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “验证码获取失败，请重试”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-193">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-194">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “不需要输入验证码”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-195">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-196">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “请求登录页面失败，无法确认是否需要验证码”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-197">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdea9c041268264-198">
               <span class="crayon-v">
                taobao
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-e">
                Taobao
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdea9c041268264-199">
               <span class="crayon-v">
                taobao
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <p>
        现在的运行结果是这样的，我们已经可以得到 J_HToken 了，离成功又迈进了一步。
       </p>
       <p>
        <a href="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225200329.jpg" title="">
         <img src="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225200329.jpg"/>
        </a>
       </p>
       <p>
        好，到现在为止，我们应该可以获取到J_HToken的值啦。
       </p>
       <h2>
        利用J_HToken获取st
       </h2>
       <p>
        st也是一个经计算得到的code，可以这么理解，st是淘宝后台利用J_HToken以及其他数据经过计算之后得到的，可以利用st和用户名直接 用get方式登录，所以st可以理解为一个秘钥。这个st值只会使用一次，如果第二次用get方式登录则会失效。所以它是一次性使用的。
       </p>
       <p>
        下面J_HToken计算st的方法如下
       </p>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdeaaa758726559">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdeaaa758726559-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeaaa758726559-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeaaa758726559-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeaaa758726559-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeaaa758726559-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeaaa758726559-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeaaa758726559-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeaaa758726559-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeaaa758726559-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeaaa758726559-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeaaa758726559-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeaaa758726559-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeaaa758726559-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeaaa758726559-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeaaa758726559-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeaaa758726559-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeaaa758726559-17">
               17
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdeaaa758726559-1">
               <span class="crayon-c">
                #通过token获得st
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeaaa758726559-2">
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                getSTbyToken
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                token
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeaaa758726559-3">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                tokenURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘https://passport.alipay.com/mini_apply_st.js?site=0&amp;token=%s&amp;callback=stCallback6’
               </span>
               <span class="crayon-o">
                %
               </span>
               <span class="crayon-k ">
                token
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeaaa758726559-4">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Request
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                tokenURL
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeaaa758726559-5">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                urlopen
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeaaa758726559-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #处理st，获得用户淘宝主页的登录地址
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeaaa758726559-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘{“st”:”(.*?)”}’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeaaa758726559-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                read
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeaaa758726559-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #如果成功匹配
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeaaa758726559-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeaaa758726559-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “成功获取st码”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeaaa758726559-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取st的值
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeaaa758726559-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                st
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeaaa758726559-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-e">
                st
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeaaa758726559-15">
               <span class="crayon-e">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeaaa758726559-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “未匹配到st”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeaaa758726559-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <h2>
        直接利用st登录
       </h2>
       <p>
        得到st之后，基本上就大功告成啦，一段辛苦终于没有白费，你可以直接构建get方式请求的URL，直接访问这个URL便可以实现登录。
       </p>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdeab1523546928">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdeab1523546928-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdeab1523546928-1">
               <span class="crayon-v">
                stURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘https://login.taobao.com/member/vst.htm?st=%s&amp;TPL_username=%s’
               </span>
               <span class="crayon-o">
                %
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                st
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                username
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <p>
        比如
       </p>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdeab5275491830">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdeab5275491830-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdeab5275491830-1">
               <span class="crayon-v">
                https
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                login
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                taobao
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                com
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                member
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                vst
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                htm
               </span>
               <span class="crayon-sy">
                ?
               </span>
               <span class="crayon-v">
                st
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-cn">
                1uynJELa4hKfsfWU3OjPJCw
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                TPL_username
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                cqcre
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <p>
        直接访问该链接即可实现登录，不过我这个应该已经失效了吧~
       </p>
       <p>
        代码在这先不贴了，剩下的一起贴了~
       </p>
       <h2>
        获取已买到的宝贝页面
       </h2>
       <p>
        已买到的宝贝的页面地址是
       </p>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdeab9287390900">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdeab9287390900-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdeab9287390900-1">
               <span class="crayon-v">
                http
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                buyer
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                trade
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                taobao
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                com
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                trade
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                itemlist
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                list_bought_items
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                htm
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <p>
        另外还有页码的参数。
       </p>
       <p>
        重新构建一个带有cookie的opener，将上面的带有st的URL打开，保存它的cookie，然后再利用这个opener打开已买到的宝贝的页面，你就会得到已买到的宝贝页面详情了。
       </p>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdeabd769271748">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdeabd769271748-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeabd769271748-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeabd769271748-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeabd769271748-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeabd769271748-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeabd769271748-6">
               6
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdeabd769271748-1">
               <span class="crayon-c">
                #获得已买到的宝贝页面
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeabd769271748-2">
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                getGoodsPage
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                pageIndex
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeabd769271748-3">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                goodsURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘http://buyer.trade.taobao.com/trade/itemlist/listBoughtItems.htm?action=itemlist/QueryAction&amp;event_submit_do_query=1&amp;pageNum=’
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-k ">
                str
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pageIndex
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeabd769271748-4">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                newOpener
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                open
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                goodsURL
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeabd769271748-5">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                read
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                decode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘gbk’
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeabd769271748-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-v">
                page
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <p>
        正则表达式提取信息
       </p>
       <p>
        这是我的已买到的宝贝界面，审查元素可以看到，每一个宝贝都是tbody标签包围着。
       </p>
       <p>
        <a href="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225223302.jpg" title="">
         <img src="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225223302.jpg"/>
        </a>
        我们现在想获取订单时间，订单号，卖家店铺名称，宝贝名称，原价，购买数量，最后付款多少，交易状态这几个量，具体就不再分析啦，正则表达式还不熟悉的同学请参考前面所说的正则表达式的用法，在这里，正则表达式匹配的代码是
       </p>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdeac1126159818">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdeac1126159818-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeac1126159818-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeac1126159818-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeac1126159818-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeac1126159818-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeac1126159818-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeac1126159818-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeac1126159818-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeac1126159818-9">
               9
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdeac1126159818-1">
               <span class="crayon-c">
                #u’\u8ba2\u5355\u53f7’是订单号的编码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeac1126159818-2">
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                ‘dealtime.*?&gt;(.*?)&lt;/span&gt;.*?\u8ba2\u5355\u53f7.*?&lt;em&gt;(.*?)&lt;/em&gt;.*?shopname.*?title=”(.*?)”.*?baobei-name”&gt;.*?&lt;a.*?&gt;(.*?)&lt;/a&gt;.*?’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeac1126159818-3">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                ‘price.*?title=”(.*?)”.*?quantity.*?title=”(.*?)”.*?amount.*?em.*?&gt;(.*?)&lt;/em&gt;.*?trade-status.*?&lt;a.*?&gt;(.*?)&lt;/a&gt;’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeac1126159818-4">
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                findall
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeac1126159818-5">
               <span class="crayon-st">
                for
               </span>
               <span class="crayon-e">
                item
               </span>
               <span class="crayon-st">
                in
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeac1126159818-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                ‘————————————————————‘
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeac1126159818-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                “购买日期:”
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                ‘订单号:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                ‘卖家店铺:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeac1126159818-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                ‘宝贝名称:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                3
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeac1126159818-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                ‘原价:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                4
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                ‘购买数量:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                5
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                ‘实际支付:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                6
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                ‘交易状态’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                7
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <h2>
        最终代码整理
       </h2>
       <p>
        恩，你懂得，最重要的东西来了，经过博主2天多的奋战，代码基本就构建完成。写了两个类，其中提取页面信息的方法我单独放到了一个类中，叫 tool.py，类名为 Tool。
       </p>
       <p>
        先看一下运行结果吧~
       </p>
       <p>
        <a href="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225234414.jpg" title="">
         <img src="http://qiniu.cuiqingcai.com/wp-content/uploads/2015/02/QQ%E6%88%AA%E5%9B%BE20150225234414.jpg"/>
        </a>
       </p>
       <p>
        最终代码如下
       </p>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdeac6528800184">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdeac6528800184-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdeac6528800184-1">
               <span class="crayon-v">
                tool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                py
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdeacd374237904">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-22">
               22
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-23">
               23
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-24">
               24
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-25">
               25
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-26">
               26
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-27">
               27
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-28">
               28
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-29">
               29
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-30">
               30
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdeacd374237904-31">
               31
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdeacd374237904-32">
               32
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-1">
               <span class="crayon-v">
                __author__
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘CQC’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-2">
               <span class="crayon-c">
                # -*- coding:utf-8 -*-
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-4">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                re
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-5">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-6">
               <span class="crayon-c">
                #处理获得的宝贝页面
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-7">
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-v">
                Tool
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-8">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #初始化
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                __init__
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                pass
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-12">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获得页码数
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                getPageNum
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                ‘&lt;div class=”total”&gt;.*?\u5171(.*?)\u9875’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                “找到了共多少页”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pageNum
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-20">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                ‘共’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                pageNum
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                ‘页’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-21">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-e">
                pageNum
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-22">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-23">
               <span class="crayon-e">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                getGoodsInfo
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-24">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #u’\u8ba2\u5355\u53f7’是订单号的编码
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-25">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                ‘dealtime.*?&gt;(.*?)&lt;/span&gt;.*?\u8ba2\u5355\u53f7.*?&lt;em&gt;(.*?)&lt;/em&gt;.*?shopname.*?title=”(.*?)”.*?baobei-name”&gt;.*?&lt;a.*?&gt;(.*?)&lt;/a&gt;.*?’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-26">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                ‘price.*?title=”(.*?)”.*?quantity.*?title=”(.*?)”.*?amount.*?em.*?&gt;(.*?)&lt;/em&gt;.*?trade-status.*?&lt;a.*?&gt;(.*?)&lt;/a&gt;’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-27">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                findall
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-28">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                for
               </span>
               <span class="crayon-e">
                item
               </span>
               <span class="crayon-st">
                in
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-29">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                ‘————————————————————‘
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-30">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                “购买日期:”
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                ‘订单号:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                ‘卖家店铺:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdeacd374237904-31">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                ‘宝贝名称:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                3
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdeacd374237904-32">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                ‘原价:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                4
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                ‘购买数量:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                5
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                ‘实际支付:’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                6
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                ‘交易状态’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                item
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                7
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                strip
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdead0481939455">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdead0481939455-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdead0481939455-1">
               <span class="crayon-v">
                taobao
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                py
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <div class="crayon-syntax crayon-theme-github crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" touchscreen minimize scroll-mouseover" id="crayon-56d7921cdead3008535098">
        <div class="crayon-toolbar" data-settings=" show">
         <div class="crayon-tools">
          <div class="crayon-button crayon-nums-button crayon-pressed" title="切换是否显示行编号">
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
          </div>
          <p>
           <span class="crayon-language">
            Python
           </span>
          </p>
         </div>
        </div>
        <div class="crayon-plain-wrap">
        </div>
        <div class="crayon-main">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content">
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-22">
               22
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-23">
               23
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-24">
               24
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-25">
               25
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-26">
               26
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-27">
               27
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-28">
               28
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-29">
               29
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-30">
               30
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-31">
               31
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-32">
               32
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-33">
               33
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-34">
               34
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-35">
               35
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-36">
               36
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-37">
               37
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-38">
               38
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-39">
               39
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-40">
               40
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-41">
               41
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-42">
               42
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-43">
               43
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-44">
               44
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-45">
               45
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-46">
               46
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-47">
               47
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-48">
               48
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-49">
               49
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-50">
               50
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-51">
               51
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-52">
               52
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-53">
               53
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-54">
               54
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-55">
               55
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-56">
               56
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-57">
               57
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-58">
               58
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-59">
               59
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-60">
               60
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-61">
               61
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-62">
               62
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-63">
               63
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-64">
               64
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-65">
               65
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-66">
               66
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-67">
               67
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-68">
               68
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-69">
               69
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-70">
               70
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-71">
               71
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-72">
               72
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-73">
               73
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-74">
               74
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-75">
               75
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-76">
               76
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-77">
               77
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-78">
               78
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-79">
               79
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-80">
               80
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-81">
               81
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-82">
               82
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-83">
               83
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-84">
               84
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-85">
               85
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-86">
               86
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-87">
               87
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-88">
               88
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-89">
               89
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-90">
               90
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-91">
               91
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-92">
               92
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-93">
               93
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-94">
               94
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-95">
               95
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-96">
               96
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-97">
               97
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-98">
               98
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-99">
               99
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-100">
               100
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-101">
               101
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-102">
               102
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-103">
               103
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-104">
               104
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-105">
               105
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-106">
               106
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-107">
               107
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-108">
               108
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-109">
               109
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-110">
               110
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-111">
               111
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-112">
               112
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-113">
               113
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-114">
               114
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-115">
               115
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-116">
               116
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-117">
               117
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-118">
               118
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-119">
               119
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-120">
               120
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-121">
               121
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-122">
               122
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-123">
               123
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-124">
               124
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-125">
               125
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-126">
               126
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-127">
               127
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-128">
               128
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-129">
               129
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-130">
               130
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-131">
               131
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-132">
               132
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-133">
               133
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-134">
               134
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-135">
               135
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-136">
               136
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-137">
               137
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-138">
               138
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-139">
               139
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-140">
               140
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-141">
               141
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-142">
               142
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-143">
               143
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-144">
               144
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-145">
               145
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-146">
               146
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-147">
               147
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-148">
               148
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-149">
               149
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-150">
               150
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-151">
               151
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-152">
               152
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-153">
               153
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-154">
               154
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-155">
               155
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-156">
               156
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-157">
               157
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-158">
               158
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-159">
               159
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-160">
               160
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-161">
               161
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-162">
               162
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-163">
               163
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-164">
               164
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-165">
               165
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-166">
               166
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-167">
               167
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-168">
               168
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-169">
               169
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-170">
               170
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-171">
               171
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-172">
               172
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-173">
               173
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-174">
               174
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-175">
               175
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-176">
               176
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-177">
               177
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-178">
               178
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-179">
               179
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-180">
               180
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-181">
               181
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-182">
               182
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-183">
               183
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-184">
               184
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-185">
               185
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-186">
               186
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-187">
               187
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-188">
               188
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-189">
               189
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-190">
               190
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-191">
               191
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-192">
               192
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-193">
               193
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-194">
               194
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-195">
               195
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-196">
               196
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-197">
               197
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-198">
               198
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-199">
               199
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-200">
               200
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-201">
               201
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-202">
               202
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-203">
               203
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-204">
               204
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-205">
               205
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-206">
               206
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-207">
               207
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-208">
               208
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-209">
               209
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-210">
               210
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-211">
               211
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-212">
               212
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-213">
               213
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-214">
               214
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-215">
               215
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-216">
               216
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-217">
               217
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-218">
               218
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-219">
               219
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-220">
               220
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-221">
               221
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-222">
               222
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-223">
               223
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-224">
               224
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-225">
               225
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-226">
               226
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-227">
               227
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-228">
               228
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-229">
               229
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-230">
               230
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-231">
               231
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-232">
               232
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-233">
               233
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-234">
               234
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-235">
               235
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-236">
               236
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-237">
               237
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-238">
               238
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-239">
               239
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-240">
               240
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-241">
               241
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-242">
               242
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-243">
               243
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-244">
               244
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-245">
               245
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-246">
               246
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-247">
               247
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-248">
               248
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-249">
               249
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-250">
               250
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-251">
               251
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-252">
               252
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-253">
               253
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-254">
               254
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-255">
               255
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-256">
               256
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-257">
               257
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-258">
               258
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-259">
               259
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-260">
               260
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-261">
               261
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-262">
               262
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-263">
               263
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-264">
               264
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-265">
               265
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-266">
               266
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-267">
               267
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-268">
               268
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-269">
               269
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-270">
               270
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-271">
               271
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-272">
               272
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-273">
               273
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-274">
               274
              </div>
              <div class="crayon-num" data-line="crayon-56d7921cdead3008535098-275">
               275
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-56d7921cdead3008535098-276">
               276
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre">
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-1">
               <span class="crayon-v">
                __author__
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘CQC’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-2">
               <span class="crayon-c">
                # -*- coding:utf-8 -*-
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-4">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                urllib
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-5">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-6">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                cookielib
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-7">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                re
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-8">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-k ">
                webbrowser
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-9">
               <span class="crayon-r">
                import
               </span>
               <span class="crayon-v">
                tool
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-10">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-11">
               <span class="crayon-c">
                #模拟登录淘宝类
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-12">
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-v">
                Taobao
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-13">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #初始化方法
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                __init__
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #登录的URL
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                “https://login.taobao.com/member/login.jhtml”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #代理IP地址，防止自己的IP被封禁
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxyURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘http://120.193.146.97:843’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-20">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #登录POST数据时发送的头部信息
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-21">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginHeaders
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-22">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Host’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘login.taobao.com’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-23">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘User-Agent’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-24">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Referer’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘https://login.taobao.com/member/login.jhtml’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-25">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Content-Type’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘application/x-www-form-urlencoded’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-26">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Connection’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘Keep-Alive’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-27">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-28">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #用户名
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-29">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                username
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘cqcre’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-30">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #ua字符串，经过淘宝ua算法计算得出，包含了时间戳,浏览器,屏幕分辨率,随机数,鼠标移动,鼠标点击,其实还有键盘输入记录,鼠标移动的记录、点击的记录等等的信息
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-31">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                ua
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘191UW5TcyMNYQwiAiwTR3tCf0J/QnhEcUpkMmQ=|Um5Ockt0TXdPc011TXVKdyE=|U2xMHDJ+H2QJZwBxX39Rb1d5WXcrSixAJ1kjDVsN|VGhXd1llXGNaYFhkWmJaYl1gV2pIdUtyTXRKfkN4Qn1FeEF6R31TBQ==|VWldfS0TMw8xDjYWKhAwHiUdOA9wCDEVaxgkATdcNU8iDFoM|VmNDbUMV|V2NDbUMV|WGRYeCgGZhtmH2VScVI2UT5fORtmD2gCawwuRSJHZAFsCWMOdVYyVTpbPR99HWAFYVMpUDUFORshHiQdJR0jAT0JPQc/BDoFPgooFDZtVBR5Fn9VOwt2EWhCOVQ4WSJPJFkHXhgoSDVIMRgnHyFqQ3xEezceIRkmahRqFDZLIkUvRiEDaA9qQ3xEezcZORc5bzk=|WWdHFy0TMw8vEy0UIQE0ADgYJBohGjoAOw4uEiwXLAw2DThuOA==|WmBAED5+KnIbdRh1GXgFQSZbGFdrUm1UblZqVGxQa1ZiTGxQcEp1I3U=|W2NDEz19KXENZwJjHkY7Ui9OJQsre09zSWlXY1oMLBExHzERLxsuE0UT|XGZGFjh4LHQdcx5zH34DRyBdHlFtVGtSaFBsUmpWbVBkSmpXd05zTnMlcw==|XWdHFzl5LXUJYwZnGkI/VitKIQ8vEzMKNws3YTc=|XmdaZ0d6WmVFeUB8XGJaYEB4TGxWbk5yTndXa0tyT29Ta0t1QGBeZDI=’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-32">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #密码，在这里不能输入真实密码，淘宝对此密码进行了加密处理，256位，此处为加密后的密码
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-33">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                password2
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘7511aa6854629e45de220d29174f1066537a73420ef6dbb5b46f202396703a2d56b0312df8769d886e6ca63d587fdbb99ee73927e8c07d9c88cd02182e1a21edc13fb8e140a4a2a4b53bf38484bd0e08199e03eb9bf7b365a5c673c03407d812b91394f0d3c7564042e3f2b11d156aeea37ad6460118914125ab8f8ac466f’
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-34">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-35">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘ua’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                ua
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-36">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_checkcode’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-37">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘CtrlVersion’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1,0,0,7’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-38">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_password’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-39">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_redirect_url’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘http://i.taobao.com/my_taobao.htm?nekot=udm8087E1424147022443’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-40">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_username’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                username
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-41">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginsite’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘0’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-42">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘newlogin’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘0’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-43">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘from’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘tb’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-44">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘fc’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘default’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-45">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘style’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘default’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-46">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘css_style’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-47">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘tid’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘XOR_1_000000000000000000000000000000_625C4720470A0A050976770A’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-48">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘support’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘000001’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-49">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginType’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘4’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-50">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘minititle’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-51">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘minipara’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-52">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘umto’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘NaN’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-53">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘pstrong’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘3’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-54">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘llnick’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-55">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘sign’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-56">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘need_sign’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-57">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘isIgnore’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-58">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘full_redirect’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-59">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘popid’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-60">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘callback’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-61">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘guf’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-62">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘not_duplite_str’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-63">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘need_user_id’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-64">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘poy’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-65">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘gvfdcname’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ’10’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-66">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘gvfdcre’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-67">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘from_encoding ‘
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-68">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘sub’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-69">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘TPL_password_2’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                password2
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-70">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginASR’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-71">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘loginASRSuc’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-72">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘allp’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ”
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-73">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘oslanguage’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘zh-CN’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-74">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘sr’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘1366*768’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-75">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘osVer’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘windows|6.1’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-76">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘naviVer’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘firefox|35’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-77">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-78">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #将POST的数据进行编码转换
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-79">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                postData
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                urlencode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-80">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置代理
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-81">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxy
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                ProxyHandler
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-s">
                ‘http’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxyURL
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-82">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置cookie
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-83">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                cookie
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                cookielib
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                LWPCookieJar
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-84">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置cookie处理器
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-85">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cookieHandler
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                HTTPCookieProcessor
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                cookie
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-86">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #设置登录时用到的opener，它的open方法相当于urllib2.urlopen
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-87">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                opener
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                build_opener
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cookieHandler
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                proxy
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                HTTPHandler
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-88">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #赋值J_HToken
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-89">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                J_HToken
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-90">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #登录成功时，需要的Cookie
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-91">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                newCookie
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                cookielib
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                CookieJar
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-92">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #登陆成功时，需要的一个新的opener
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-93">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                newOpener
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                build_opener
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                HTTPCookieProcessor
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                newCookie
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-94">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #引入工具类
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-95">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                tool
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                tool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Tool
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-96">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-97">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到是否需要输入验证码，这次请求的相应有时会不同，有时需要验证有时不需要
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-98">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                needCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-99">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #第一次登录获取验证码尝试，构建request
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-100">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Request
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginURL
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                postData
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginHeaders
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-101">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到第一次登录尝试的相应
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-102">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                opener
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                open
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-103">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取其中的内容
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-104">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                read
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                decode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘gbk’
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-105">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取状态吗
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-106">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getcode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-107">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #状态码为200，获取成功
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-108">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-cn">
                200
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-109">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “获取请求成功”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-110">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801这六个字是请输入验证码的utf-8编码
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-111">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                ‘\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-112">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-113">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #如果找到该字符，代表需要输入验证码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-114">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-115">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “此次安全验证异常，您需要输入验证码”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-116">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-v">
                content
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-117">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #否则不需要
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-118">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-119">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #返回结果直接带有J_HToken字样，表明直接验证通过
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-120">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                tokenPattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘id=”J_HToken” value=”(.*?)”‘
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-121">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                tokenPattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-122">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-123">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                J_HToken
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-124">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “此次安全验证通过，您这次不需要输入验证码”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-125">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-126">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-127">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “获取请求失败”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-128">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                None
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-129">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-130">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到验证码图片
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-131">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                getCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-132">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到验证码的图片
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-133">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘&lt;img id=”J_StandardCode_m.*?data-src=”(.*?)”‘
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-134">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #匹配的结果
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-135">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                matchResult
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-136">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #已经匹配得到内容，并且验证码图片链接不为空
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-137">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-e">
                matchResult
               </span>
               <span class="crayon-st">
                and
               </span>
               <span class="crayon-v">
                matchResult
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-138">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-v">
                matchResult
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-139">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-140">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “没有找到验证码内容”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-141">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-142">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-143">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #输入验证码，重新请求，如果验证成功，则返回J_HToken
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-144">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                loginWithCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-145">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #提示用户输入验证码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-146">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                checkcode
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                raw_input
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘请输入验证码:’
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-147">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #将验证码重新添加到post的数据中
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-148">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-s">
                ‘TPL_checkcode’
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                checkcode
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-149">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #对post数据重新进行编码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-150">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                postData
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                urlencode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                post
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-151">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                try
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-152">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #再次构建请求，加入验证码之后的第二次登录尝试
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-153">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Request
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginURL
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                postData
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                loginHeaders
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-154">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到第一次登录尝试的相应
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-155">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                opener
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                open
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-156">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取其中的内容
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-157">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                read
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                decode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘gbk’
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-158">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #检测验证码错误的正则表达式，\u9a8c\u8bc1\u7801\u9519\u8bef 是验证码错误五个字的编码
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-159">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                ‘\u9a8c\u8bc1\u7801\u9519\u8bef’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-160">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-161">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #如果返回页面包括了，验证码错误五个字
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-162">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-163">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “验证码输入错误”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-164">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-165">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-166">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #返回结果直接带有J_HToken字样，说明验证码输入成功，成功跳转到了获取HToken的界面
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-167">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                tokenPattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘id=”J_HToken” value=”(.*?)”‘
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-168">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                tokenPattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-169">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #如果匹配成功，找到了J_HToken
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-170">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-171">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “验证码输入正确”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-172">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                J_HToken
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-173">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-v">
                tokenMatch
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-174">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-175">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #匹配失败，J_Token获取失败
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-176">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “J_Token获取失败”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-177">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-178">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                except
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                HTTPError
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                e
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-179">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “连接服务器出错，错误原因”
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                e
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                reason
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-180">
               <span class="crayon-e">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-181">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-182">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #通过token获得st
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-183">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                getSTbyToken
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                token
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-184">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                tokenURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘https://passport.alipay.com/mini_apply_st.js?site=0&amp;token=%s&amp;callback=stCallback6’
               </span>
               <span class="crayon-o">
                %
               </span>
               <span class="crayon-k ">
                token
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-185">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Request
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                tokenURL
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-186">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                urlopen
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-187">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #处理st，获得用户淘宝主页的登录地址
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-188">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘{“st”:”(.*?)”}’
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-189">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                read
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-190">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #如果成功匹配
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-191">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-192">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “成功获取st码”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-193">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取st的值
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-194">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                st
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-195">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-e">
                st
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-196">
               <span class="crayon-e">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-197">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “未匹配到st”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-198">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-199">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-200">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #利用st码进行登录,获取重定向网址
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-201">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                loginByST
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                st
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                username
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-202">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                stURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘https://login.taobao.com/member/vst.htm?st=%s&amp;TPL_username=%s’
               </span>
               <span class="crayon-o">
                %
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                st
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                username
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-203">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                headers
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-204">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘User-Agent’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-205">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Host’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘login.taobao.com’
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-206">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                ‘Connection’
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                ‘Keep-Alive’
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-207">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-208">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                urllib2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Request
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                stURL
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                headers
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                headers
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-209">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                newOpener
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                open
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                request
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-210">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                read
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                decode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘gbk’
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-211">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #检测结果，看是否登录成功
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-212">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                compile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘top.location = “(.*?)”‘
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                S
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-213">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                match
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-k ">
                re
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                search
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pattern
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                content
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-214">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                match
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-215">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “登录网址成功”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-216">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                location
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                match
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                group
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-217">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                True
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-218">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-219">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                “登录失败”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-220">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-t">
                False
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-221">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-222">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获得已买到的宝贝页面
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-223">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                getGoodsPage
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                pageIndex
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-224">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                goodsURL
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ‘http://buyer.trade.taobao.com/trade/itemlist/listBoughtItems.htm?action=itemlist/QueryAction&amp;event_submit_do_query=1’
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-s">
                ‘&amp;pageNum=’
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-k ">
                str
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pageIndex
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-225">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                newOpener
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-k ">
                open
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                goodsURL
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-226">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                response
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                read
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                decode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                ‘gbk’
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-227">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
               <span class="crayon-v">
                page
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-228">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-229">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取所有已买到的宝贝信息
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-230">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                getAllGoods
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                pageNum
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-231">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “获取到的商品列表如下”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-232">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                for
               </span>
               <span class="crayon-i">
                x
               </span>
               <span class="crayon-st">
                in
               </span>
               <span class="crayon-k ">
                range
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-k ">
                int
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pageNum
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-233">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getGoodsPage
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                x
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-234">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                tool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getGoodsInfo
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-235">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-236">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #程序运行主干
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-237">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                def
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-238">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #是否需要验证码，是则得到页面内容，不是则返回False
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-239">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                needResult
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                needCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-240">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #请求获取失败，得到的结果是None
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-241">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-st">
                not
               </span>
               <span class="crayon-v">
                needResult
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-t">
                None
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-242">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-st">
                not
               </span>
               <span class="crayon-v">
                needResult
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-t">
                False
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-243">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “您需要手动输入验证码”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-244">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                checkCode
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                needResult
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-245">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #得到了验证码的链接
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-246">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-st">
                not
               </span>
               <span class="crayon-v">
                checkCode
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-t">
                False
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-247">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “验证码获取成功”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-248">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “请在浏览器中输入您看到的验证码”
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-249">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                webbrowser
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                open_new_tab
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                checkCode
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-250">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                loginWithCheckCode
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-251">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #验证码链接为空，无效验证码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-252">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-253">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “验证码获取失败，请重试”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-254">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-255">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “不需要输入验证码”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-256">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-257">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “请求登录页面失败，无法确认是否需要验证码”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-258">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-259">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #判断token是否正常获取到
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-260">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-st">
                not
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                J_HToken
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-261">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-s">
                “获取Token失败，请重试”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-262">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                return
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-263">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获取st码
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-264">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                st
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getSTbyToken
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                J_HToken
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-265">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #利用st进行登录
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-266">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                loginByST
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                st
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                username
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-267">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-v">
                result
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-268">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                #获得所有宝贝的页面
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-269">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getGoodsPage
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-270">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pageNum
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                tool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getPageNum
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                page
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-271">
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                self
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getAllGoods
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pageNum
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-272">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-o">
                :
               </span>
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-273">
               <span class="crayon-h">
               </span>
               <span class="crayon-k ">
                print
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-s">
                “登录失败”
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-274">
              </div>
              <div class="crayon-line" id="crayon-56d7921cdead3008535098-275">
               <span class="crayon-v">
                taobao
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-e">
                Taobao
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-56d7921cdead3008535098-276">
               <span class="crayon-v">
                taobao
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <p>
        好啦，运行结果就是上面贴的图片，可以成功获取到自己的商品列表，前提是把你们的 用户名，ua，password2这三个设置好。
       </p>
       <p>
        以上均为博主亲身所敲，代码写的不好，谨在此贴出和大家一起分享经验~
       </p>
       <p>
        小伙伴们试一下吧，希望对大家有帮助~
       </p>
      </div>
      <div>
       <strong>
        注：转载文章均来自于公开网络，仅供学习使用，不会用于任何商业用途，如果侵犯到原作者的权益，请您与我们联系删除或者授权事宜，联系邮箱：contact@dataunion.org。转载数盟网站文章请注明原文章作者，否则产生的任何版权纠纷与数盟无关。
       </strong>
      </div>
      <!--content_text-->
      <div class="fenxian">
       <!-- JiaThis Button BEGIN -->
       <div class="jiathis_style_32x32">
        <p class="jiathis_button_weixin">
        </p>
        <p class="jiathis_button_tsina">
        </p>
        <p class="jiathis_button_qzone">
        </p>
        <p class="jiathis_button_cqq">
        </p>
        <p class="jiathis_button_tumblr">
        </p>
        <a class="jiathis jiathis_txt jtico jtico_jiathis" href="http://www.jiathis.com/share" target="_blank">
        </a>
        <p class="jiathis_counter_style">
        </p>
       </div>
       <!-- JiaThis Button END -->
      </div>
     </article>
     <!--content-->
     <!--相关文章-->
     <div class="xianguan">
      <div class="xianguantitle">
       相关文章！
      </div>
      <ul class="pic">
       <li>
        <a href="http://dataunion.org/24678.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/20140917125452915416-216x200.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24678.html" rel="bookmark" title="python3中的正则模块">
         python3中的正则模块
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24675.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/t015b337bd75d9ef893-161x200.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24675.html" rel="bookmark" title="注释是恶魔，请不要再写一行注释">
         注释是恶魔，请不要再写一行注释
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24660.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/u16130037972892789947fm21gp0-300x157.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24660.html" rel="bookmark" title="如何从Github上轻松安装R包">
         如何从Github上轻松安装R包
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24654.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/df53fac99fc53ba5a90666abcca25e6d_b-267x200.png"/>
        </a>
        <a class="link" href="http://dataunion.org/24654.html" rel="bookmark" title="简单形象又有趣地说说强大的神经网络">
         简单形象又有趣地说说强大的神经网络
        </a>
       </li>
      </ul>
     </div>
     <!--相关文章-->
     <div class="comment" id="comments">
      <!-- You can start editing here. -->
      <ul id="comment">
       <li id="comment-12938">
        <span>
         <p class="avatar" href="" target="_blank">
          <img src="https://secure.gravatar.com/avatar/c7b9424203f2323e73e57be4b3f5cdda?s=86"/>
         </p>
        </span>
        <div class="mhcc">
         <address>
          Lyn - 
						2016/03/07
         </address>
         <p>
          以前用Scala写过一个类似的，楼主的正则用得666
         </p>
        </div>
       </li>
       <!-- #comment-## -->
      </ul>
      <div class="title">
       期待你一针见血的评论，Come on！
      </div>
      <div id="respond">
       <p>
        不用想啦，马上
        <a href="http://dataunion.org/wp-login.php?redirect_to=http%3A%2F%2Fdataunion.org%2F22388.html">
         "登录"
        </a>
        发表自已的想法.
       </p>
      </div>
     </div>
     <!-- .nav-single -->
    </div>
    <!--Container End-->
    <aside id="sitebar">
     <div class="sitebar_list2">
      <div class="wptag">
       <span class="tagtitle">
        热门标签+
       </span>
       <div class="tagg">
        <ul class="menu" id="menu-%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1605" id="menu-item-1605">
          <a href="http://taidizh.com/">
           泰迪智慧
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20884" id="menu-item-20884">
          <a href="http://www.transwarp.cn/">
           星环科技
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3538" id="menu-item-3538">
          <a href="http://datall.org/">
           珈和遥感
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20888" id="menu-item-20888">
          <a href="http://www.chinahadoop.cn/">
           小象学院
          </a>
         </li>
        </ul>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <div class="textwidget">
       <div align="center">
        <a href="http://study.163.com/course/courseMain.htm?courseId=991022" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/dv.jpg"/>
        </a>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       文章分类
      </h4>
      <div class="tagcloud">
       <a class="tag-link-44" href="http://dataunion.org/category/industry/demo" style="font-size: 10.204724409449pt;" title="4个话题">
        Demo展示
       </a>
       <a class="tag-link-31" href="http://dataunion.org/category/experts" style="font-size: 15.826771653543pt;" title="52个话题">
        专家团队
       </a>
       <a class="tag-link-870" href="http://dataunion.org/category/tech/ai" style="font-size: 19.795275590551pt;" title="273个话题">
        人工智能
       </a>
       <a class="tag-link-488" href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f" style="font-size: 8pt;" title="1个话题">
        加入数盟
       </a>
       <a class="tag-link-869" href="http://dataunion.org/category/tech/viz" style="font-size: 17.204724409449pt;" title="93个话题">
        可视化
       </a>
       <a class="tag-link-30" href="http://dataunion.org/category/partners" style="font-size: 10.645669291339pt;" title="5个话题">
        合作伙伴
       </a>
       <a class="tag-link-889" href="http://dataunion.org/category/parterc" style="font-size: 11.582677165354pt;" title="8个话题">
        合作会议
       </a>
       <a class="tag-link-104" href="http://dataunion.org/category/books" style="font-size: 12.96062992126pt;" title="15个话题">
        图书
       </a>
       <a class="tag-link-220" href="http://dataunion.org/category/tech/base" style="font-size: 19.850393700787pt;" title="281个话题">
        基础架构
       </a>
       <a class="tag-link-219" href="http://dataunion.org/category/tech/analysis" style="font-size: 19.409448818898pt;" title="232个话题">
        数据分析
       </a>
       <a class="tag-link-887" href="http://dataunion.org/category/tech/dm" style="font-size: 13.291338582677pt;" title="17个话题">
        数据挖掘
       </a>
       <a class="tag-link-34" href="http://dataunion.org/category/tech" style="font-size: 20.732283464567pt;" title="404个话题">
        文章
       </a>
       <a class="tag-link-1" href="http://dataunion.org/category/uncategorized" style="font-size: 22pt;" title="693个话题">
        未分类
       </a>
       <a class="tag-link-4" href="http://dataunion.org/category/events" style="font-size: 14.503937007874pt;" title="29个话题">
        活动
       </a>
       <a class="tag-link-890" href="http://dataunion.org/category/tech/%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0" style="font-size: 10.204724409449pt;" title="4个话题">
        深度学习
       </a>
       <a class="tag-link-221" href="http://dataunion.org/category/tech/devl" style="font-size: 18.968503937008pt;" title="193个话题">
        编程语言
       </a>
       <a class="tag-link-888" href="http://dataunion.org/category/career" style="font-size: 15.661417322835pt;" title="48个话题">
        职业规划
       </a>
       <a class="tag-link-5" href="http://dataunion.org/category/jobs" style="font-size: 14.11811023622pt;" title="25个话题">
        职位
       </a>
       <a class="tag-link-871" href="http://dataunion.org/category/industry" style="font-size: 15.716535433071pt;" title="49个话题">
        行业
       </a>
       <a class="tag-link-613" href="http://dataunion.org/category/industry/case" style="font-size: 16.984251968504pt;" title="84个话题">
        行业应用
       </a>
       <a class="tag-link-885" href="http://dataunion.org/category/industry/news" style="font-size: 17.425196850394pt;" title="102个话题">
        行业资讯
       </a>
       <a class="tag-link-10" href="http://dataunion.org/category/training" style="font-size: 14.228346456693pt;" title="26个话题">
        课程
       </a>
       <a class="tag-link-16" href="http://dataunion.org/category/sources" style="font-size: 15.661417322835pt;" title="48个话题">
        资源
       </a>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       功能
      </h4>
      <ul>
       <li>
        <a href="http://dataunion.org/wp-login.php?action=register">
         注册
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/wp-login.php">
         登录
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/feed">
         文章
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/comments/feed">
         评论
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="https://cn.wordpress.org/" title="基于WordPress，一个优美、先进的个人信息发布平台。">
         WordPress.org
        </a>
       </li>
      </ul>
     </div>
    </aside>
    <div class="clear">
    </div>
   </div>
   <!--main-->
   ﻿
   <footer id="dibu">
    <div class="about">
     <div class="right">
      <ul class="menu" id="menu-%e5%ba%95%e9%83%a8%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18024" id="menu-item-18024">
        <a href="http://dataunion.org/category/partners">
         合作伙伴
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20881" id="menu-item-20881">
        <a href="http://dataunion.org/contribute">
         文章投稿
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20872" id="menu-item-20872">
        <a href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f">
         加入数盟
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22441" id="menu-item-22441">
        <a href="http://dataunion.org/f-links">
         友情链接
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20874" id="menu-item-20874">
        <a href="http://dataunion.org/aboutus">
         关于数盟
        </a>
       </li>
      </ul>
      <p class="banquan">
       数盟社区        ，
        做最棒的数据科学社区
      </p>
     </div>
     <div class="left">
      <ul class="bottomlist">
       <li>
        <a href="http://weibo.com/DataScientistUnion  " target="_blank" 　title="">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weibo.png"/>
        </a>
       </li>
       <li>
        <a class="cd-popup-trigger" href="http://dataunion.org/22388.html#0">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weixin.png"/>
        </a>
       </li>
      </ul>
      <div class="cd-popup">
       <div class="cd-popup-container">
        <h1>
         扫描二维码,加微信公众号
        </h1>
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/2014-12-06-1515289049.png"/>
        <a class="cd-popup-close" href="http://dataunion.org/22388.html">
        </a>
       </div>
       <!-- cd-popup-container -->
      </div>
      <!-- cd-popup -->
     </div>
    </div>
    <!--about-->
    <div class="bottom">
     <a href="http://dataunion.org/">
      数盟社区
     </a>
     <a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">
      京ICP备14026740号
     </a>
     联系我们：
     <a href="mailto:contact@dataunion.org" target="_blank">
      contact@dataunion.org
     </a>
     <div class="tongji">
     </div>
     <!--bottom-->
     <div class="scroll" id="scroll" style="display:none;">
      ︿
     </div>
    </div>
   </footer>
   <!--dibu-->
  </div>
 </body>
</html>